//
//  RBHudVC.m
//  RBDemoProj
//
//  Created by Lan on 2019/1/3.
//  Copyright © 2019年 SummerTea. All rights reserved.

 /*
 UIDatePickerModeTime,              -150
 UIDatePickerModeDate,              -230
 UIDatePickerModeDateAndTime,       -290
 UIDatePickerModeCountDownTimer,    -150
 */

#import "RBPopVC.h"

@interface RBPopVC ()

@property(nonatomic, assign) BOOL appeared;

@end

@implementation RBPopVC

#pragma mark - Lifecycle

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])
    {
        self.dismissOnTapBlank = YES;
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    if (!self.appeared)
    {
        self.appeared = YES;
        [self show];
    }
}

#pragma mark - Private

#pragma mark - Public

- (void)show
{
    
}

- (void)dismiss
{
    
}

#pragma mark - Event

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    CGPoint location = [touches.anyObject locationInView:self.view];
    if (!CGRectContainsPoint(self.contentView.frame, location) && self.dismissOnTapBlank)
    {
        [self dismiss];
    }
}

#pragma mark - Getter

@end
